#ifndef _KWIC_H
#define _KWIC_H

#include <iostream.h>
#include "CPstring.h"
#include "vector.h"
#include "wordlist.h"
#include "ktitle.h"
#include "title.h"

// Kwic (Key Word in Context) main application class
//
//
// ***************************************************
// in this file not all data/functions in the private
// section are provided!!
// ***************************************************


class Kwic
{
  public:
    Kwic();                        // constructor
    ~Kwic();                       // destructor
    void Read (istream & input);
    void Print(ostream & out) const;     // print (sorted form)

  private:

    // helper functions

    // data
    
    WordList * myIgnore;                      // words to ignore
    WordList * myWords;                       // all words
    Vector<KwicTitle> myKwicTitles;           // KWIC Titles
    Vector<Title *>   myTitles;               // Titles
    int myKwicCount;                          // # of KWIC titles
    int myCount;                              // # of Titles
};

#endif
